<!DOCTYPE HTML>
<html>

<head>
    <title>短信收发管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="../../../assets/css/dpl-min.css" rel="stylesheet" type="text/css"/>
    <link href="../../../assets/css/bui-min.css" rel="stylesheet" type="text/css"/>
    <link href="../../../assets/css/page-min.css" rel="stylesheet" type="text/css"/>
    <link href="../../../assets/css/jx-style.css" rel="stylesheet" type="text/css"/>
    <link href="../../../assets/css/prettify.css" rel="stylesheet" type="text/css"/>
</head>
<body class="dark-theme">
<div class="container">
    <div class="detail-page span24">
        <div class="detail-page-title">
            <h4>短信收发管理
            </h4>
        </div>
        <div class="detail-section">
            <div class="detail-row">
                <div>
                    <div id="grid"></div>
                    <div></div>
                    <div></div>
                </div>
            </div>
            <!-- 表格 start-->
            <!--   <div id="grid"></div> -->
            <!-- 表格 end-->
        </div>
    </div>
</div>
</div>

<script type="text/javascript" src="../../../assets/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="../../../assets/js/bui-min.js"></script>
<script type="text/javascript" src="../../../assets/js/config-min.js"></script>
<script type="text/javascript">
    BUI.use('common/page');
</script>
<!-- script start -->
<script>
    BUI.use(['bui/grid', 'bui/data', 'bui/overlay', 'bui/calendar', 'common/search'], function (Grid, Data, Overlay, Calendar, Search) {
        var Grid = Grid,
            Store = Data.Store,
            columns = [{
                title: '发送条件',
                dataIndex: 'a',
                elCls: 'center', //居中
                width: 100
            }, {
                title: '状态',
                elCls: 'center',
                dataIndex: 'b',
                width: 150
            }, {
                title: '状态',
                dataIndex: 'h',
                elCls: 'center',
                width: 200,
                renderer: function (value, obj) {
                    return '<span class="grid-command btn-edit">[ 关闭 ]</span>'; //页面操作不需要使用Search.createLink
                }
            }],
            data = [{
                a: '用户注册获取验证码',
                b: '已开启',

            }];

        var store = new Store({ //初始化数据
                data: data,
                pageSize: 2 // 配置分页数目
            }),
            grid = new Grid.Grid({
                render: '#grid',
                elCls: 'small-bui-grid-table',
                columns: columns,
                forceFit: true,
                bbar: {
                    // pagingBar:表明包含分页栏
                    pagingBar: true
                },
                store: store
            });


        //点击操作
        grid.on('itemclick', function (ev) {
            var sender = $(ev.domTarget),
                itemEl = $(ev.element),
                item = ev.item;

            if (sender.hasClass('btn-edit')) { //点击刪除操作
                Function(item, itemEl);
            }

        });

        //没有多选插件，删除选中的记录
        function Function(item, itemEl) {
            BUI.Message.Confirm('确认关闭该账号吗？', function () {
                /*      $.ajax({
                 url: basePath + '/mallGoodsBrandFacade/delete',
                 dataType: 'json',
                 data: {id: item.id},
                 success: function (data) {
                 if (data.status == '0') { //删除成功
                 store.remove(item);
                 } else { //删除失败
                 BUI.Message.Alert(data.info, "error");
                 BUI.Message.Alert('删除失败！');
                 }
                 }
                 });*/
            }, 'question');
        }

        grid.render();
    });
</script>
<!-- script end -->

<body>

</html>
